package com.zx.idc.backend.gui.base.monitor;


import com.zx.idc.backend.gui.common.BaseApi;
import com.zx.idc.backend.gui.common.Result;
import com.zx.idc.ds.base.monitor.entity.BaseMonitorDevIpSeg;
import com.zx.idc.ds.base.monitor.service.IBaseMonitorDevIpSegService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 监控设备-监控ip地址段 前端控制器
 * </p>
 *
 * @author rxliuli
 * @since 2019-01-31
 */
@RestController
@RequestMapping("/api/baseMonitorDevIpSeg")
public class BaseMonitorDevIpSegController extends BaseApi {
    @Autowired
    private IBaseMonitorDevIpSegService service;

    @GetMapping("/list-by-device-id/{deviceId}")
    @RequiresPermissions("basic-data:base-monitor-device")
    public Result<List<BaseMonitorDevIpSeg>> listByDeviceIjd(@PathVariable Long deviceId) {
        return success(service.selectList(new BaseMonitorDevIpSeg().setDeviceId(deviceId)));
    }
}

